<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>判断奇数偶数</title>
</head>
<body>
    <script>
        var arr = prompt('请输入数值，并进行判断，判断它是奇数，还是偶数');
        if(arr == 0){
            alert('不是奇数，也不是偶数');
        }else if(arr % 2 == 0){
            alert('这是偶数');
        }else if(arr % 2 != 0){
            alert('这是奇数');
        }
    </script>
</body>
</html>